/********************************************************************************
 *      Copyright:  (C) 2021 iot
 *                  All rights reserved.
 *
 *       Filename:  tsl2561.h
 *    Description:  This head file 
 *
 *        Version:  1.0.0
 *         Author:  mk
 *                 
 ********************************************************************************/
#ifndef _TSL2561_H_
#define _TSL2561_H_

#define TSL2561_I2C_ADDR                0x39   
#define CONTROL_REG                     0x80   
#define REG_COUNT                       4      
#define POWER_UP                        0x03   
#define POWER_DOWN                      0x00       

#define ON  1
#define OFF 0

enum
{
    /*  Channel_0 = DATA0HIGH<<8 + DATA0LOW */ 
    DATA0LOW = 0x8c,
    DATA0HIGH,

    /*  Channel_1 = DATA1HIGH<<8 + DATA1LOW */
    DATA1LOW,
    DATA1HIGH,
};

extern int tsl2561_init(void);
extern float tsl2561_get_lux( float *lux);




#endif


